import { PKG_NAME, PKG_PREFIX } from './constants'

/** used for type generator */
export const pathRewriter = (module: string) => {
  return (id: string) => {
    // id = id.replaceAll(`${PKG_PREFIX}/theme-chalk`, `${PKG_NAME}/theme-chalk`)
    const res = id.replaceAll(`${PKG_PREFIX}/`, `${PKG_NAME}/${module}/`)
    return res
  }
}
